<?php

/**
 * ReportForm
 *
 * @author Julot <andy.julot@gmail.com>
 */
class ReportForm extends FormModel {

	public $firstDateTime;
	public $lastDateTime;
	
	public function init() {
		$this->lastDateTime = date('Y-m-d H:i:s');
	}
	
	public function rules() {
		return array(
			// All scenario
			array(
				array(
					'firstDateTime',
					'lastDateTime',
				),
				'date',
				'format'=>'yyyy-MM-dd hh:mm:ss',
			),
			
			array(
				'firstDateTime, lastDateTime',
				'required',
				'on'=>'dateTimeRange',
			),
		);
	}

	public function attributeLabels() {
		return array(
			'firstDateTime'=>'Awal',
			'lastDateTime'=>'Akhir',
		);
	}

}
